import requests

class Request:
    def __init__(self,url):
        self.url = url

    def sent_request(self):
        headers = {"Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
                   "Accept-Encoding":"gzip, deflate, br",
                   "Accept-Language":"zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7",
                   "Cache-Contro":"max-age=0",
                   "Connection":"Connection",
                   "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"}
        response = requests.get(url=self.url,headers=headers)
        print(response.status_code)

if __name__ == '__main__':
    c = Request("http://www.baidu.com")
    c.sent_request()